/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package slicktest.entities.InputEntity;

import java.awt.Font;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.TrueTypeFont;
import slicktest.entities.Drawable.Drawable;

/**
 *
 * @author enrightt
 */
public class TowerBuildMenu extends InputEntity implements Drawable {

    private float tlx;
    private float tly;

    private final int width;
    private final int height;

    private boolean isOpen = false;

    private final Color fillColor;
    private final Color borderColor;
    private final Color textColor;
    private final TrueTypeFont textFont;

    private static final int FONT_SIZE = 18;

    public TowerBuildMenu(int width, int height, int screenWidth, int screenHeight, Color fillColor, Color borderColor, Color textColor) {
        this.fillColor = fillColor;
        this.borderColor = borderColor;
        this.textColor = textColor;
        this.textFont = new TrueTypeFont(new Font("ARIAL", Font.BOLD, FONT_SIZE), true);

        this.tlx = 0;
        this.tly = screenHeight - height;
        
        this.width = width;
        this.height = height;
    }

    public String getType() {
        return "Tower Build Component";
    }

    public void update(GameContainer gc, int delta) throws SlickException {

    }

    public void render(GameContainer gc, Graphics graphics) throws SlickException {
        if (isOpen) {
            graphics.setColor(fillColor);
            graphics.fillRect(tlx, tly, width, height);

            graphics.setColor(borderColor);
            graphics.drawRect(tlx, tly, width, height);

        }
    }
}
